<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<!--
 ~ Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
 ~
 ~ WSO2 Inc. licenses this file to you under the Apache License,
 ~ Version 2.0 (the "License"); you may not use this file except
 ~ in compliance with the License.
 ~ You may obtain a copy of the License at
 ~
 ~    http://www.apache.org/licenses/LICENSE-2.0
 ~
 ~ Unless required by applicable law or agreed to in writing,
 ~ software distributed under the License is distributed on an
 ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 ~ KIND, either express or implied.  See the License for the
 ~ specific language governing permissions and limitations
 ~ under the License.
 -->
<html>

<head>
    <meta content="text/html; charset=ISO-8859-1" http-equiv="content-type" />
    <title>Setting Up JMX Agent for DAS - User Guide</title>
    <link href="../../admin/css/documentation.css" rel="stylesheet" type="text/css" media="all" />
</head>

<body>

    <div id="content" class="page view">



        <h1>Setting Up JMX Agent for DAS</h1>

        <div class="wiki-content">

            <p><span style="color: rgb(0,0,0);text-decoration: none;">The JMX agent for DAS is used to monitor JMX attributes of a required JMX enabled server (Ex- Carbon based servers) and store the monitored data in DAS. The monitored data is sent to the DAS server using the Thrift API of DAS.&nbsp;</span>
            </p>
            <h4 id="SettingUpJMXAgentforBAM-UsingtheJMXagent">Using the JMX agent</h4>
            <ol>
                <li><span style="color: rgb(0,0,0);">In the management console, select <strong>JMX Agent</strong> from the <strong>Configure</strong> menu.</span>
                </li>
                <li><span style="font-size: 10.0pt;line-height: 13.0pt;">If there are any existing JMX monitoring profiles, they appear here. Each JMX monitoring profile is used to monitor a set of attributes from a single JMX server.<br><span style="font-size: 10.0pt;line-height: 13.0pt;">You can enable/disable monitoring of JMX attributes from here and also edit the monitoring profiles.</span>
                    <br>
                    </span>
                </li>
                <li><span style="font-size: 10.0pt;line-height: 13.0pt;"><span style="font-size: 10.0pt;line-height: 13.0pt;">To add a new monitoring profile, click <strong>Add Profile</strong> link and fill the required fields.<br></span></span>
                <p><img src="images/basic-infor.PNG" class="confluence-embedded-image"/></p>
                    <br>
                    <ul>
                        <li>In the Basic information section, enter a unique profile name.</li>
                        <li>In the Data Receiver Information section,</li>
                        <ul>
                            <li><strong>Receiver address</strong>&nbsp;- The address used to send the data to DAS</li>
                            <li><strong>Secure address</strong>&nbsp;- The address used to authenticate the data publishing request</li>
                            <li><strong>username</strong>&nbsp;- The username for the data publisher</li>
                            <li><strong>password</strong>&nbsp;- The password for the data publisher</li>
                            <li><strong>schedule</strong>&nbsp;- Can configure how often the attributes should be monitored using a cron expression</li>
                        </ul>
                        <li>In the JMX Server Information section,&nbsp;</li>
                        <ul>
                            <li><strong>server URL -&nbsp;</strong>The JMX server URL. In this example we can use&nbsp;<strong><a rel="nofollow">service:jmx:rmi://localhost:11111/jndi/rmi://localhost:9999/jmxrmi</a></strong>&nbsp;since we&nbsp;will be monitoring DAS it self.</li>
                            <li><strong>username</strong>&nbsp;- The username for the JMX server</li>
                            <li><strong>password</strong>&nbsp;- The password for the JMX server</li>
                        </ul>
                    </ul>
                </li>
                <li><span style="font-size: 10.0pt;line-height: 13.0pt;">Click <strong>Load MBeans</strong>.</span>
                </li>
                <li><span style="font-size: 10.0pt;line-height: 13.0pt;">Click an MBean from the list that loads to see its&nbsp;</span><span style="font-size: 10.0pt;line-height: 13.0pt;">attributes list.&nbsp;</span>
                </li>
                <li><span style="font-size: 10.0pt;line-height: 13.0pt;">Add required attributes to the list that is monitored by this profile and save the pofile. You can set an alias to easily identify the data in the Cassandra database.</span>
                </li>
                <li><span style="font-size: 10.0pt;line-height: 13.0pt;">The newly-added JMX profile starts monitoring the attributes and publishing them to the Cassandra database. The data is published to the EVENT_KS with the name in </span><strong style="font-size: 10.0pt;line-height: 13.0pt;">org_wso2_bam_jmx_agent_&lt;PROFILE_NAME&gt; </strong>format.&nbsp;<span style="font-size: 10.0pt;line-height: 13.0pt;">If you set an alias for the attribute, it will also be visible here.</span>
                </li>
            </ol>

        </div>

</body>

</html>
